package com.eshore.norm.pojo.po;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author HJ
 * @date 2024/1/9 14:57
 */
@NoArgsConstructor
@Data
public class NormNetworkStatsPO {

    @JsonProperty("message")
    private String message;
    @JsonProperty("content")
    private List<ContentDTO> content;
    @JsonProperty("status")
    private Integer status;
    @JsonProperty("total")
    private Integer total;
    @JsonProperty("timestamp")
    private String timestamp;

    @NoArgsConstructor
    @Data
    public static class ContentDTO {
        @JsonProperty("data_refresh_at")
        private String dataRefreshAt;
        @JsonProperty("network_stat")
        private NetworkStatDTO networkStat;

        @NoArgsConstructor
        @Data
        public static class NetworkStatDTO {
            @JsonProperty("net_qualities")
            private List<NetQualitiesDTO> netQualities;
            @JsonProperty("up_traffics")
            private String upTraffics;
            @JsonProperty("net_usage_percent")
            private String netUsagePercent;
            @JsonProperty("down_traffic")
            private String downTraffic;

            @NoArgsConstructor
            @Data
            public static class NetQualitiesDTO {
                @JsonProperty("packet_lost")
                private String packetLost;
                @JsonProperty("network_delay")
                private String networkDelay;
                @JsonProperty("quality_to")
                private String qualityTo;
                @JsonProperty("quality_from")
                private String qualityFrom;
                @JsonProperty("status")
                private String status;
            }
        }
    }
}
